const test1={
    name:'login',
    age:null,
    gender:undefined
}
console.log(test1?.name);//login
console.log(test1?.age);//null
console.log(test1?.gender);//undefined
console.log(test1?.hobby);//undefined
// console.log(hobby);//ReferenceError: hobby is not defined

console.log('----------------??----------------');
console.log(test1.name??'window');//login
console.log(test1.age??'100');//100
console.log(test1.gender??'female');//female
console.log(NaN??5);//NaN
console.log(false??15);//false
console.log(""??5);//""